const joi = require('joi');

const department1 = joi.string().required();
const user_id = joi.number().required();
const add_date = joi.date().required();

const department2 = joi.string().required();
const department_id = joi.number().required();

const state = joi.number().required();
const department1_id = joi.number().required();
const department2_id = joi.number().required();

const delete_state = joi.number().required();

// 添加一级部门
exports.addDepartment_schema = {
	body: {
		department1,
		user_id,
		add_date
	}
}

// 添加二级部门
exports.addDepartmentSon_schema = {
	body: {
		department2,
		department_id
	}
}

// 是否启用
exports.startDepartment_schema = {
	body: {
		state,
		department1_id
	}
}

// 删除一级部门
exports.deleteDepartment_schema = {
	body: {
		delete_state,
		department1_id
	}
}

// 删除二级部门
exports.deleteDepartmentSon_schema = {
	body: {
		delete_state,
		department2_id
	}
}

// 修改一级部门
exports.updateDepartment_shcema = {
	body: {
		department1_id,
		department1
	}
}

// 修改二级部门
exports.updateDepartmentSon_shcema = {
	body: {
		department2_id,
		department2,
		department_id
	}
}